In addition to digital cameras, digital camera function is widely available as a built-in function for many portable electronic devices such as cellular phones, tablet computers, and laptop computers. These portable electronic devices are often taken with users and experience changing environment and conditions during their use. For instance, a user may take photographs using the digital camera function of a cellular phone over a wide range of temperatures and orientations. Many components, including lenses, are commonly made of plastic material and are susceptible to thermal expansion and contraction. Depending on the orientation of the portable electronic device, gravity may have a different effect on movable components, such as a lens assembly for focusing, and a different amount force may be needed to move the lens assembly depending on the orientation of the portable electronic device. For instance, if gravity is acting in a direction opposite of a direction of lens assembly movement, greater force may be required to move the lens assembly than if gravity is acting in a direction perpendicular to movement of the lens assembly. Typically, digital camera function, auto-focusing for example, may be calibrated at a factory with certain fixed conditions, such as holding the portable electronic device at a constant temperature with a specific orientation, then having the calibration profile saved in the portable electronic device. However, such a specific profile may not always correspond to actual use conditions.